<template>
  <div>
    <table class="table1 owntable tableLayout" border="0" cellspacing="0" cellpadding="1" width="100%">
      <tr>
        <td width="150">风险管理编号</td>
        <td>{{ item.number }}</td>
        <td width="150">风险管理名称</td>
        <td>{{ item.name }}</td>
      </tr>

      <tr>
        <td>产品名称</td>
        <td>{{ item.productName || '-' }}</td>
        <td>产品代码</td>
        <td>{{ item.productCode || '-' }}</td>
      </tr>
      <tr>
        <td>规格型号</td>
        <td>{{ item.skus || '-' }}</td>
        <td>管理部门</td>
        <td>{{ item.manageDeptName }}</td>
      </tr>

      <tr>
        <td>负责人</td>
        <td>{{ item.manageUserName }}</td>
        <td>编制部门</td>
        <td>{{ item.createDeptName }}</td>
      </tr>
    </table>

    <div class="white_bg mb10 mt10">风险管理如下：</div>

    <table class="table1 owntable" border="0" cellspacing="0" cellpadding="1" width="100%" v-for="(v, k) in item.controlList" :key="k">
      <tr>
        <td>产品状态</td>
        <td colspan="3">{{ item.productStatus == 0 ? '正常状态' : '故障状态' }}</td>
      </tr>
      <tr style="height: 20px;"></tr>
      <tr>
        <td colspan="3"><b>风险分析、评价和控制：</b></td>
      </tr>
      <tr><td rowspan="18" width="120">1</td></tr>

      <tr>
        <td class="white_bg w160">危险（源）</td>
        <td>{{ v.wxy1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">事件序列</td>
        <td>{{ v.sjxl1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">概率分级</td>
        <td>{{ v.glfj1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">严重度水平分级</td>
        <td>{{ v.yzfj1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">风险评价</td>
        <td>{{ v.fxpj1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">是否需要降低风险</td>
        <td>{{ v.jdfx1 == 0 ? '否' : '是' }}</td>
      </tr>
      <tr v-if="v.jdfx1 == 1">
        <td class="white_bg w160">风险控制措施</td>
        <td>{{ v.kzcs1 }}</td>
      </tr>
      <tr>
        <td class="white_bg w160">是否有剩余风险</td>
        <td>{{ v.syfx1 == 0 ? '否' : '是' }}</td>
      </tr>
      <tr v-if="v.syfx1 == 1">
        <td colspan="2" class="gray_bg" style="padding: 0;">
          <el-collapse class="gray_bg">
            <el-collapse-item title="剩余风险分析、评价和控制" name="1" class="gray_bg">
              <!-- <table> -->
              <tr>
                <td class="c_gary_bg w160">危险（源）</td>
                <td width="380">{{ v.wxy2 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">事件序列</td>
                <td>{{ v.sjxl2 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">概率分级</td>
                <td>{{ v.glfj2 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">严重度水平分级</td>
                <td>{{ v.yzfj2 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">风险评价</td>
                <td>{{ v.fxpj2 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">是否需要降低风险</td>
                <td>{{ v.jdfx2 == 0 ? '否' : '是' }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">是否有剩余风险</td>
                <td>{{ v.syfx2 == 0 ? '否' : '是' }}</td>
              </tr>
              <!-- </table> -->
            </el-collapse-item>
          </el-collapse>

          <!-- <b>剩余风险分析、评价和控制</b> -->
        </td>
      </tr>
      <tr>
        <td class="white_bg w160">剩余风险/产品受益</td>
        <td>{{ v.fxsy2 == 0 ? '剩余风险大于产品受益' : '产品受益大于剩余风险' }}</td>
      </tr>
      <tr v-if="v.syfx2 == 1">
        <td colspan="2" class="c_gary_bg" style="padding: 0;">
          <el-collapse class="c_gary_bg">
            <el-collapse-item title="剩余风险大于产品受益的风险分析、评价和控制" name="1" class="gray_bg">
              <!-- <table width="520"> -->
              <tr>
                <td class="c_gary_bg w160">危险（源）</td>
                <td width="380">{{ v.wxy3 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">事件序列</td>
                <td>{{ v.sjxl3 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">概率分级</td>
                <td>{{ v.glfj3 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">严重度水平分级</td>
                <td>{{ v.yzfj3 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">风险评价</td>
                <td>{{ v.fxpj3 }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">是否需要降低风险</td>
                <td>{{ v.jdfx3 == 0 ? '否' : '是' }}</td>
              </tr>
              <tr>
                <td class="c_gary_bg w160">是否有剩余风险</td>
                <td>{{ v.syfx3 == 0 ? '否' : '是' }}</td>
              </tr>
              <!-- </table> -->
            </el-collapse-item>
          </el-collapse>

          <!-- <b>剩余风险分析、评价和控制</b> -->
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
export default {
  props: {
    item: {}
  }
};
</script>

<style></style>
